package com.example.teachmvandroidchart.ui

import android.graphics.Color
import android.os.Bundle
import android.os.Handler
import android.os.Looper
import com.android.frame.mvp.CommonBaseActivity
import com.example.teachmvandroidchart.databinding.ActivityLinechartBinding
import com.example.teachmvandroidchart.databinding.ActivityMpandroidchartBinding
import com.example.teachmvandroidchart.widget.DynamicLineChartManager
import com.gyf.immersionbar.ImmersionBar
import java.util.ArrayList

/**
 * Created by dell on 2021/8/11.
 */
class MPAndroidChartActivity: CommonBaseActivity<ActivityMpandroidchartBinding>() {

    override fun handleView(savedInstanceState: Bundle?) {
        intView()

    }
    private fun intView() {
        ImmersionBar.with(this).titleBar(binding.toolbar).keyboardEnable(true).init()
        ImmersionBar.with(this).titleBar(binding.toolbar).init()
        setSupportActionBar(binding.toolbar)
        val actionBar = supportActionBar
        actionBar?.setDisplayHomeAsUpEnabled(true)
    }
    override fun initListener() {
        //曲线图
        binding.button1.setOnClickListener {
            startActivity(DynamicLineChartActivity::class.java)
        }
        //条形图
        binding.button2.setOnClickListener {
            startActivity(HistogramActivity::class.java)
        }
        //条形图+曲线图
        binding.button3.setOnClickListener {
            startActivity(ComBinchartActivity::class.java)
        }
        //
        binding.button4.setOnClickListener {
            startActivity(OtherActiviyy::class.java)
        }
        //toolbar返回按钮监听
        binding.toolbar.setNavigationOnClickListener { finish() }
    }


}
